#ifndef _TRANSFILE_
#define _TRANSFILE_
#include "directory.h"
#include "server.h"
#include <openssl/sha.h>
typedef struct train_s{
    int tag;
    int length;
    char data[1000];
}train_t;

int recvTrain(int netfd,int* tag, char* pathName);

int recvn(int sockfd, void *buf, int length);

int sendPWD(int netfd, char* pwd);

int sendLS(int netfd,char** lsconbin);

int getfile_c_to_s(int netfd,char* pathName,stackDir_t* dirStack,MYSQL* mysql,char* usrname);

int putfile_s_to_c(int netfd,char* pathname,stackDir_t* dirStack,MYSQL* mysql,char* usrname);

int removefile(char* pathname,stackDir_t* dirStack,char* usrname,MYSQL* mysql);

int getHash(char* filename,char* hash);
#endif
